using System;
using System.Collections.Generic;
using System.Text;
using System.Data;
using System.Globalization;
using Gencode.Common.SQL;

namespace Personalplaner
{
    public sealed class DPlanOrPerson
    {
        public enum PlanorpersonType { Plan, Person }

        static int count;
        static PlanorpersonType type;

        private DPlanOrPerson() { }

        internal static void SetData()
        {
			DataView dv = SimpleQuerry.ExecuteForDataView("select count(typ) from Options where typ = 'PlanOrPersonTyp'");
            try
            {
                count = Int16.Parse(dv[0].Row[0].ToString(), CultureInfo.CurrentCulture);
            }
            catch (FormatException fe)
            {
				Gencode.Common.Util.ErrorHandler.LoggError("Error", "DPlanOrPerson.SetData()", fe.Message);
            }
        }

        #region Properties
        internal static int Count
        {
            get { return DPlanOrPerson.count; }
            //set { DPlanOrPerson.count = value; }
        }

        internal static PlanorpersonType Type
        {
            get { return DPlanOrPerson.type; }
            set { DPlanOrPerson.type = value; }
        }

        #endregion
    }
}
